// utils.js
export const colors  = [
  '#1E212D',
  '#313F4E',
  '#5E4C61',
  '#4F6D7A',
  '#6B6746',
  '#72718C',
  '#2E5458',
  '#5B7457',
  '#6E6362',
  '#657672',
];

// utils.js
export const getRandomColor = () => {
  const letters = '0123456789ABCDEF';
  let color = '#';
  const minBrightness = 0.6; // Minimum brightness for good contrast
  const maxBrightness = 0.9; // Maximum brightness for good contrast

  for (let i = 0; i < 6; i++) {
    color += letters[Math.floor(Math.random() * 16)];
  }

  const brightness = (parseInt(color.slice(1), 16) >> 16) / 255; // Calculate brightness

  if (brightness < minBrightness || brightness > maxBrightness) {
    // If brightness is not within the desired range, regenerate the color
    return getRandomColor();
  }

  return color;
};



